# -*- coding = utf-8 -*-
# @Time : 2020/12/5 17:28
# @Author : 家幸
# @File : demo12.py
# @Software : PyCharm

# 函数的定义
# def printinfo():
#     print("-----------------")
#     print("     人生苦短，我用Python        ")
#     print("-----------------")
#
# # 函数的调用
# printinfo()

# #带参数的函数
# def add2Num(a,b):
#     c = a + b
#     print(c)
# add2Num(11,22)

# #带返回值的函数
# def add2Num(a,b):
#     return a + b
# print(add2Num(11,22))

# # 返回多个值的函数
# def divid(a, b):
#     shang = a // b
#     yushu = a % b
#     return shang, yushu
#
#
# sh, yu = divid(5, 2)
# print("商:%d,余数:%d" % (sh, yu))

# 全局变量和局部变量
def test1():
    a = 300
    print(a)
